package org.codeart.order.remote;

import org.codeart.common.dto.Car;
import org.codeart.common.response.OrderDriverResponse;
import org.codeart.common.util.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "service-driver-user")
public interface ServiceDriverUserClient {

    @GetMapping("/city-driver/is-available")
    R<Boolean> isAvailableDriver(@RequestParam("cityCode") String cityCode);

    @GetMapping("/available-driver/{carId}")
    R<OrderDriverResponse> getAvailableDriver(@PathVariable("carId") Long carId);
    
    @GetMapping("/car")
    R<Car> getCarById(@RequestParam("carId") Long carId);
}
